<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>构造函数</title>
</head>
<body>
  <script>
     function Star(uname,age){
       this.uname=uname
       this.age=age
       this.sing=function(){
         console.log("唱歌")
       }
     }
     const lzs=new Star("李钟硕",33)
     const lze=new Star("李知恩",30)
     console.log(lzs)
     console.log(lze)
     lzs.sing()
     lze.sing()
     console.log(lzs.sing===lze.sing)
  </script>
</body>
</html>